import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JApplet;
import javax.swing.JButton;


public class pruebaLayout extends JApplet {

	/**
	 * Create the applet.
	 */
	private void buildConstraints(GridBagConstraints gbc, int gx,int gy,int gw, int gh, int wx,int wy){
		gbc.gridx=gx;
		gbc.gridy=gy;
		gbc.gridwidth=gw;
		gbc.gridheight=gh;
		gbc.weightx=wx;
		gbc.weighty=wy;
	}
	public pruebaLayout() {
		GridBagLayout gb=new GridBagLayout();
		//getContentPane().setLayout(gb);
		GridBagConstraints cons=new GridBagConstraints();
		setLayout(gb);
		buildConstraints(cons,0,0,1,1,10,40);
		cons.fill=GridBagConstraints.BOTH;
		//cons.anchor=GridBagConstraints.EAST;
		JButton btn=new JButton("a");
		gb.setConstraints(btn, cons);
		add(btn);
		
		buildConstraints(cons,1,0,1,1,90,0);
		JButton btn1=new JButton("b");
		gb.setConstraints(btn, cons);
		add(btn1);
		
		buildConstraints(cons,1,0,1,1,0,0);
		JButton btn2=new JButton("c");
		gb.setConstraints(btn, cons);
		add(btn2);
		
	}
	
}
